---
title: MongoDB
---

>[MongoDB](https://www.mongodb.com/) is a NoSQL, document-oriented
> database that supports JSON-like documents with a dynamic schema.

**NOTE:**
- See other `MongoDB` integrations on the [MongoDB Atlas page](/oss/integrations/providers/mongodb_atlas).

## Installation and Setup

Install the Python package:

<CodeGroup>
```bash pip
pip install langchain-mongodb
```

```bash uv
uv add langchain-mongodb
```
</CodeGroup>

## Message Histories

See a [usage example](/oss/integrations/memory/mongodb_chat_message_history).

To import this vectorstore:
```python
from langchain_mongodb.chat_message_histories import MongoDBChatMessageHistory
```
